package com.example.demo.design.mediator;

/**
 * @Author: liull
 * @Description:
 * @Date: Created in 14:51 2021/4/6
 * @Modified By:
 */
public abstract class Component {
    protected Mediator mediator;

    public void setMediator(Mediator mediator) {
        this.mediator = mediator;
    }

    public void changed() {
        mediator.componentChanged(this);
    }

    public abstract void update();
}
